<template>
  <global-header :user="user"></global-header>
  <teleport to="#loading">
    <div>loading</div>
  </teleport>
  <router-view />
</template>
<script lang="ts">
import { defineComponent, computed } from 'vue';
import GlobalHeader from '@/components/GlobalHeader.vue';
import { VuxProps } from '@/store';
import { useStore } from 'vuex';
import 'bootstrap/dist/css/bootstrap.min.css';

export default defineComponent({
  name: 'APP',
  components: { GlobalHeader },
  setup() {
    const store = useStore<VuxProps>();
    const currentUser = computed(() => store.state.user);
    return {
      user: currentUser,
    };
  },
});
</script>

<style lang="scss">
</style>
